<!-- HTML header for doxygen 1.8.9.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines -->
<title>Compute Library: arm_compute/core/CL/CLKernelLibrary.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Compute Library
   &#160;<span id="projectnumber">17.10</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.xhtml"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.xhtml"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.xhtml"><span>Namespaces</span></a></li>
      <li><a href="annotated.xhtml"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.xhtml"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.xhtml"><span>File&#160;List</span></a></li>
      <li><a href="globals.xhtml"><span>Globals</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('_c_l_kernel_library_8h_source.xhtml','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(11)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">CLKernelLibrary.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_c_l_kernel_library_8h.xhtml">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * Copyright (c) 2016, 2017 ARM Limited.</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * SPDX-License-Identifier: MIT</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * Permission is hereby granted, free of charge, to any person obtaining a copy</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> * of this software and associated documentation files (the &quot;Software&quot;), to</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> * deal in the Software without restriction, including without limitation the</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> * sell copies of the Software, and to permit persons to whom the Software is</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> * furnished to do so, subject to the following conditions:</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> * The above copyright notice and this permission notice shall be included in all</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> * copies or substantial portions of the Software.</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> * THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment"> * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment"> * SOFTWARE.</span></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor">#ifndef __ARM_COMPUTE_CLKERNELLIBRARY_H__</span></div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define __ARM_COMPUTE_CLKERNELLIBRARY_H__</span></div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_open_c_l_8h.xhtml">arm_compute/core/CL/OpenCL.h</a>&quot;</span></div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="preprocessor">#include &lt;map&gt;</span></div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="preprocessor">#include &lt;set&gt;</span></div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="preprocessor">#include &lt;utility&gt;</span></div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="keyword">namespace </span>arm_compute</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;{</div>
<div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="classarm__compute_1_1_program.xhtml">   37</a></span>&#160;<span class="keyword">class </span><a class="code" href="classarm__compute_1_1_program.xhtml">Program</a></div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;{</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;    <a class="code" href="classarm__compute_1_1_program.xhtml#ad00a93de0aaf77172116c42bed3a5627">Program</a>();</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    <a class="code" href="classarm__compute_1_1_program.xhtml#ad00a93de0aaf77172116c42bed3a5627">Program</a>(cl::Context context, std::string <a class="code" href="classarm__compute_1_1_program.xhtml#a37627d5d5bba7f4a8690c71c2ab3cb07">name</a>, std::string source);</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    <a class="code" href="classarm__compute_1_1_program.xhtml#ad00a93de0aaf77172116c42bed3a5627">Program</a>(cl::Context context, cl::Device device, std::string name, std::vector&lt;unsigned char&gt; binary);</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;    <a class="code" href="classarm__compute_1_1_program.xhtml#ad00a93de0aaf77172116c42bed3a5627">Program</a>(<span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_program.xhtml">Program</a> &amp;) = <span class="keywordflow">default</span>;</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    <a class="code" href="classarm__compute_1_1_program.xhtml#ad00a93de0aaf77172116c42bed3a5627">Program</a>(<a class="code" href="classarm__compute_1_1_program.xhtml">Program</a> &amp;&amp;) = <span class="keywordflow">default</span>;</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    <a class="code" href="classarm__compute_1_1_program.xhtml">Program</a> &amp;<a class="code" href="classarm__compute_1_1_program.xhtml#aa960ae62f188ce6593855ea9d90f3140">operator=</a>(<span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_program.xhtml">Program</a> &amp;) = <span class="keywordflow">default</span>;</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;    <a class="code" href="classarm__compute_1_1_program.xhtml">Program</a> &amp;<a class="code" href="classarm__compute_1_1_program.xhtml#aa960ae62f188ce6593855ea9d90f3140">operator=</a>(<a class="code" href="classarm__compute_1_1_program.xhtml">Program</a> &amp;&amp;) = <span class="keywordflow">default</span>;</div>
<div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="classarm__compute_1_1_program.xhtml#a37627d5d5bba7f4a8690c71c2ab3cb07">   69</a></span>&#160;    std::string <a class="code" href="classarm__compute_1_1_program.xhtml#a37627d5d5bba7f4a8690c71c2ab3cb07">name</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;<span class="keyword">    </span>{</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;        <span class="keywordflow">return</span> _name;</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    }</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;    <span class="keyword">explicit</span> <span class="keyword">operator</span> cl::Program() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="classarm__compute_1_1_program.xhtml#ad321fe7c8b8db45f1e48b6f7d13346c5">build</a>(<span class="keyword">const</span> cl::Program &amp;program, <span class="keyword">const</span> std::string &amp;build_options = <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;    cl::Program <a class="code" href="classarm__compute_1_1_program.xhtml#ad321fe7c8b8db45f1e48b6f7d13346c5">build</a>(<span class="keyword">const</span> std::string &amp;build_options = <span class="stringliteral">&quot;&quot;</span>) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;    cl::Context                _context;   </div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;    cl::Device                 _device;    </div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;    <span class="keywordtype">bool</span>                       _is_binary; </div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;    std::string                _name;      </div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;    std::string                _source;    </div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    std::vector&lt;unsigned char&gt; _binary;    </div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;};</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;</div>
<div class="line"><a name="l00098"></a><span class="lineno"><a class="line" href="classarm__compute_1_1_kernel.xhtml">   98</a></span>&#160;<span class="keyword">class </span><a class="code" href="classarm__compute_1_1_kernel.xhtml">Kernel</a></div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;{</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;    <a class="code" href="classarm__compute_1_1_kernel.xhtml#a4d7fb588e6d609d95d8cd491492ed420">Kernel</a>();</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;    <a class="code" href="classarm__compute_1_1_kernel.xhtml#a4d7fb588e6d609d95d8cd491492ed420">Kernel</a>(<span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_kernel.xhtml">Kernel</a> &amp;) = <span class="keywordflow">default</span>;</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;    <a class="code" href="classarm__compute_1_1_kernel.xhtml#a4d7fb588e6d609d95d8cd491492ed420">Kernel</a>(<a class="code" href="classarm__compute_1_1_kernel.xhtml">Kernel</a> &amp;&amp;) = <span class="keywordflow">default</span>;</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;    <a class="code" href="classarm__compute_1_1_kernel.xhtml">Kernel</a> &amp;<a class="code" href="classarm__compute_1_1_kernel.xhtml#a9729d318da4230e664a923d7419ddf10">operator=</a>(<span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_kernel.xhtml">Kernel</a> &amp;) = <span class="keywordflow">default</span>;</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;    <a class="code" href="classarm__compute_1_1_kernel.xhtml">Kernel</a> &amp;<a class="code" href="classarm__compute_1_1_kernel.xhtml#a9729d318da4230e664a923d7419ddf10">operator=</a>(<a class="code" href="classarm__compute_1_1_kernel.xhtml">Kernel</a> &amp;&amp;) = <span class="keywordflow">default</span>;</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;    <a class="code" href="classarm__compute_1_1_kernel.xhtml#a4d7fb588e6d609d95d8cd491492ed420">Kernel</a>(std::string <a class="code" href="classarm__compute_1_1_kernel.xhtml#a37627d5d5bba7f4a8690c71c2ab3cb07">name</a>, <span class="keyword">const</span> cl::Program &amp;program);</div>
<div class="line"><a name="l00121"></a><span class="lineno"><a class="line" href="classarm__compute_1_1_kernel.xhtml#a37627d5d5bba7f4a8690c71c2ab3cb07">  121</a></span>&#160;    std::string <a class="code" href="classarm__compute_1_1_kernel.xhtml#a37627d5d5bba7f4a8690c71c2ab3cb07">name</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;<span class="keyword">    </span>{</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;        <span class="keywordflow">return</span> _name;</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;    }</div>
<div class="line"><a name="l00129"></a><span class="lineno"><a class="line" href="classarm__compute_1_1_kernel.xhtml#ad3a94f90bef30dbf3529c617cb8b2c53">  129</a></span>&#160;    <span class="keyword">explicit</span> <span class="keyword">operator</span> cl::Kernel()<span class="keyword"> const</span></div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;<span class="keyword">    </span>{</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;        <span class="keywordflow">return</span> _kernel;</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;    }</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;    std::string _name;   </div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;    cl::Kernel  _kernel; </div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;};</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;</div>
<div class="line"><a name="l00140"></a><span class="lineno"><a class="line" href="classarm__compute_1_1_c_l_kernel_library.xhtml">  140</a></span>&#160;<span class="keyword">class </span><a class="code" href="classarm__compute_1_1_c_l_kernel_library.xhtml">CLKernelLibrary</a></div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;{</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;    <span class="keyword">using</span> StringSet = std::set&lt;std::string&gt;;</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;    <a class="code" href="classarm__compute_1_1_c_l_kernel_library.xhtml">CLKernelLibrary</a>();</div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;    <a class="code" href="classarm__compute_1_1_c_l_kernel_library.xhtml">CLKernelLibrary</a>(<span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_c_l_kernel_library.xhtml">CLKernelLibrary</a> &amp;) = <span class="keyword">delete</span>;</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;    <span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_c_l_kernel_library.xhtml">CLKernelLibrary</a> &amp;<a class="code" href="classarm__compute_1_1_c_l_kernel_library.xhtml#a54fb81956f9fb1c25b279e34e1e7d966">operator=</a>(<span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_c_l_kernel_library.xhtml">CLKernelLibrary</a> &amp;) = <span class="keyword">delete</span>;</div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;    <span class="keyword">static</span> <a class="code" href="classarm__compute_1_1_c_l_kernel_library.xhtml">CLKernelLibrary</a> &amp;<span class="keyword">get</span>();</div>
<div class="line"><a name="l00163"></a><span class="lineno"><a class="line" href="classarm__compute_1_1_c_l_kernel_library.xhtml#af353532ea782387df6bcb6d01894f4ae">  163</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classarm__compute_1_1_c_l_kernel_library.xhtml#af353532ea782387df6bcb6d01894f4ae">init</a>(std::string kernel_path = <span class="stringliteral">&quot;.&quot;</span>, cl::Context context = cl::Context::getDefault(), cl::Device device = cl::Device::getDefault())</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;    {</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;        _kernel_path = std::move(kernel_path);</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;        _context     = std::move(context);</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;        _device      = std::move(device);</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;    }</div>
<div class="line"><a name="l00173"></a><span class="lineno"><a class="line" href="classarm__compute_1_1_c_l_kernel_library.xhtml#a66a558a56f5d0dcd6305c405ebc38cc2">  173</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classarm__compute_1_1_c_l_kernel_library.xhtml#a66a558a56f5d0dcd6305c405ebc38cc2">set_kernel_path</a>(<span class="keyword">const</span> std::string &amp;kernel_path)</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;    {</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;        _kernel_path = kernel_path;</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;    };</div>
<div class="line"><a name="l00179"></a><span class="lineno"><a class="line" href="classarm__compute_1_1_c_l_kernel_library.xhtml#ad7395c158d8e31b9af211b9bc1f65a08">  179</a></span>&#160;    std::string <a class="code" href="classarm__compute_1_1_c_l_kernel_library.xhtml#ad7395c158d8e31b9af211b9bc1f65a08">get_kernel_path</a>()</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;    {</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;        <span class="keywordflow">return</span> _kernel_path;</div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;    };</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;    std::string <a class="code" href="classarm__compute_1_1_c_l_kernel_library.xhtml#a44e90c4fa1204a708499ece56d4c82f0">get_program_source</a>(<span class="keyword">const</span> std::string &amp;program_name);</div>
<div class="line"><a name="l00195"></a><span class="lineno"><a class="line" href="classarm__compute_1_1_c_l_kernel_library.xhtml#a293edc1bbcbddffb7228ac97917ed107">  195</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classarm__compute_1_1_c_l_kernel_library.xhtml#a293edc1bbcbddffb7228ac97917ed107">set_context</a>(cl::Context context)</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;    {</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;        _context = std::move(context);</div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;</div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;        <span class="keyword">const</span> <span class="keyword">auto</span> cl_devices = _context.getInfo&lt;CL_CONTEXT_DEVICES&gt;();</div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;</div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;        <span class="keywordflow">if</span>(cl_devices.empty())</div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;        {</div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;            _device = cl::Device();</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;        }</div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;        <span class="keywordflow">else</span></div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;        {</div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;            _device = cl_devices[0];</div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;        }</div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;    }</div>
<div class="line"><a name="l00214"></a><span class="lineno"><a class="line" href="classarm__compute_1_1_c_l_kernel_library.xhtml#a5a6865d04c8d3348860f3cb8100fdb97">  214</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classarm__compute_1_1_c_l_kernel_library.xhtml#a5a6865d04c8d3348860f3cb8100fdb97">set_device</a>(cl::Device device)</div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;    {</div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;        _device = std::move(device);</div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;    }</div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;    <a class="code" href="classarm__compute_1_1_kernel.xhtml">Kernel</a> <a class="code" href="classarm__compute_1_1_c_l_kernel_library.xhtml#a07b37240bd1f09e36cf119dced79f9c4">create_kernel</a>(<span class="keyword">const</span> std::string &amp;kernel_name, <span class="keyword">const</span> StringSet &amp;build_options_set = {}) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classarm__compute_1_1_c_l_kernel_library.xhtml#a7c0b2aa80e920344936e8e7dbaa73e43">save_binary</a>();</div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classarm__compute_1_1_c_l_kernel_library.xhtml#a389a543ae040ca6bf6b57fd6215f154b">load_binary</a>();</div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;    <span class="keywordtype">size_t</span> <a class="code" href="classarm__compute_1_1_c_l_kernel_library.xhtml#ab04a95a810e685a1207c7f3443668261">max_local_workgroup_size</a>(<span class="keyword">const</span> cl::Kernel &amp;kernel) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;    cl::NDRange <a class="code" href="classarm__compute_1_1_c_l_kernel_library.xhtml#a6dc2398a934f02224ad3743185f27699">default_ndrange</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;</div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;    <span class="keyword">const</span> Program &amp;load_program(<span class="keyword">const</span> std::string &amp;program_name) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;    std::string stringify_set(<span class="keyword">const</span> StringSet &amp;s) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;</div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;    cl::Context _context;                                                </div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;    cl::Device  _device;                                                 </div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;    std::string _kernel_path;                                            </div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;    <span class="keyword">mutable</span> std::map&lt;std::string, const Program&gt;    _programs_map;       </div>
<div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;    <span class="keyword">mutable</span> std::map&lt;std::string, cl::Program&gt;      _built_programs_map; </div>
<div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;    <span class="keyword">static</span> <span class="keyword">const</span> std::map&lt;std::string, std::string&gt; _kernel_program_map; </div>
<div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;    <span class="keyword">static</span> <span class="keyword">const</span> std::map&lt;std::string, std::string&gt; _program_source_map; </div>
<div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;};</div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;}</div>
<div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* __ARM_COMPUTE_CLKERNELLIBRARY_H__ */</span><span class="preprocessor"></span></div>
<div class="ttc" id="classarm__compute_1_1_c_l_kernel_library_xhtml_af353532ea782387df6bcb6d01894f4ae"><div class="ttname"><a href="classarm__compute_1_1_c_l_kernel_library.xhtml#af353532ea782387df6bcb6d01894f4ae">arm_compute::CLKernelLibrary::init</a></div><div class="ttdeci">void init(std::string kernel_path=&quot;.&quot;, cl::Context context=cl::Context::getDefault(), cl::Device device=cl::Device::getDefault())</div><div class="ttdoc">Initialises the kernel library. </div><div class="ttdef"><b>Definition:</b> <a href="_c_l_kernel_library_8h_source.xhtml#l00163">CLKernelLibrary.h:163</a></div></div>
<div class="ttc" id="classarm__compute_1_1_c_l_kernel_library_xhtml_a66a558a56f5d0dcd6305c405ebc38cc2"><div class="ttname"><a href="classarm__compute_1_1_c_l_kernel_library.xhtml#a66a558a56f5d0dcd6305c405ebc38cc2">arm_compute::CLKernelLibrary::set_kernel_path</a></div><div class="ttdeci">void set_kernel_path(const std::string &amp;kernel_path)</div><div class="ttdoc">Sets the path that the kernels reside in. </div><div class="ttdef"><b>Definition:</b> <a href="_c_l_kernel_library_8h_source.xhtml#l00173">CLKernelLibrary.h:173</a></div></div>
<div class="ttc" id="classarm__compute_1_1_kernel_xhtml_a4d7fb588e6d609d95d8cd491492ed420"><div class="ttname"><a href="classarm__compute_1_1_kernel.xhtml#a4d7fb588e6d609d95d8cd491492ed420">arm_compute::Kernel::Kernel</a></div><div class="ttdeci">Kernel()</div><div class="ttdoc">Default Constructor. </div></div>
<div class="ttc" id="classarm__compute_1_1_program_xhtml_a37627d5d5bba7f4a8690c71c2ab3cb07"><div class="ttname"><a href="classarm__compute_1_1_program.xhtml#a37627d5d5bba7f4a8690c71c2ab3cb07">arm_compute::Program::name</a></div><div class="ttdeci">std::string name() const </div><div class="ttdoc">Returns program name. </div><div class="ttdef"><b>Definition:</b> <a href="_c_l_kernel_library_8h_source.xhtml#l00069">CLKernelLibrary.h:69</a></div></div>
<div class="ttc" id="classarm__compute_1_1_c_l_kernel_library_xhtml_a293edc1bbcbddffb7228ac97917ed107"><div class="ttname"><a href="classarm__compute_1_1_c_l_kernel_library.xhtml#a293edc1bbcbddffb7228ac97917ed107">arm_compute::CLKernelLibrary::set_context</a></div><div class="ttdeci">void set_context(cl::Context context)</div><div class="ttdoc">Sets the CL context used to create programs. </div><div class="ttdef"><b>Definition:</b> <a href="_c_l_kernel_library_8h_source.xhtml#l00195">CLKernelLibrary.h:195</a></div></div>
<div class="ttc" id="classarm__compute_1_1_c_l_kernel_library_xhtml_a54fb81956f9fb1c25b279e34e1e7d966"><div class="ttname"><a href="classarm__compute_1_1_c_l_kernel_library.xhtml#a54fb81956f9fb1c25b279e34e1e7d966">arm_compute::CLKernelLibrary::operator=</a></div><div class="ttdeci">const CLKernelLibrary &amp; operator=(const CLKernelLibrary &amp;)=delete</div><div class="ttdoc">Prevent instances of this class from being copied. </div></div>
<div class="ttc" id="classarm__compute_1_1_c_l_kernel_library_xhtml_a5a6865d04c8d3348860f3cb8100fdb97"><div class="ttname"><a href="classarm__compute_1_1_c_l_kernel_library.xhtml#a5a6865d04c8d3348860f3cb8100fdb97">arm_compute::CLKernelLibrary::set_device</a></div><div class="ttdeci">void set_device(cl::Device device)</div><div class="ttdoc">Sets the CL device for which the programs are created. </div><div class="ttdef"><b>Definition:</b> <a href="_c_l_kernel_library_8h_source.xhtml#l00214">CLKernelLibrary.h:214</a></div></div>
<div class="ttc" id="classarm__compute_1_1_c_l_kernel_library_xhtml_a44e90c4fa1204a708499ece56d4c82f0"><div class="ttname"><a href="classarm__compute_1_1_c_l_kernel_library.xhtml#a44e90c4fa1204a708499ece56d4c82f0">arm_compute::CLKernelLibrary::get_program_source</a></div><div class="ttdeci">std::string get_program_source(const std::string &amp;program_name)</div><div class="ttdoc">Gets the source of the selected program. </div></div>
<div class="ttc" id="classarm__compute_1_1_program_xhtml"><div class="ttname"><a href="classarm__compute_1_1_program.xhtml">arm_compute::Program</a></div><div class="ttdoc">Program class. </div><div class="ttdef"><b>Definition:</b> <a href="_c_l_kernel_library_8h_source.xhtml#l00037">CLKernelLibrary.h:37</a></div></div>
<div class="ttc" id="classarm__compute_1_1_c_l_kernel_library_xhtml_a7c0b2aa80e920344936e8e7dbaa73e43"><div class="ttname"><a href="classarm__compute_1_1_c_l_kernel_library.xhtml#a7c0b2aa80e920344936e8e7dbaa73e43">arm_compute::CLKernelLibrary::save_binary</a></div><div class="ttdeci">void save_binary()</div><div class="ttdoc">Serializes and saves programs to a binary. </div></div>
<div class="ttc" id="classarm__compute_1_1_kernel_xhtml_a9729d318da4230e664a923d7419ddf10"><div class="ttname"><a href="classarm__compute_1_1_kernel.xhtml#a9729d318da4230e664a923d7419ddf10">arm_compute::Kernel::operator=</a></div><div class="ttdeci">Kernel &amp; operator=(const Kernel &amp;)=default</div><div class="ttdoc">Default copy assignment operator. </div></div>
<div class="ttc" id="classarm__compute_1_1_c_l_kernel_library_xhtml_a389a543ae040ca6bf6b57fd6215f154b"><div class="ttname"><a href="classarm__compute_1_1_c_l_kernel_library.xhtml#a389a543ae040ca6bf6b57fd6215f154b">arm_compute::CLKernelLibrary::load_binary</a></div><div class="ttdeci">void load_binary()</div><div class="ttdoc">Load serialized binary with all the programs. </div></div>
<div class="ttc" id="classarm__compute_1_1_program_xhtml_ad00a93de0aaf77172116c42bed3a5627"><div class="ttname"><a href="classarm__compute_1_1_program.xhtml#ad00a93de0aaf77172116c42bed3a5627">arm_compute::Program::Program</a></div><div class="ttdeci">Program()</div><div class="ttdoc">Default constructor. </div></div>
<div class="ttc" id="classarm__compute_1_1_kernel_xhtml"><div class="ttname"><a href="classarm__compute_1_1_kernel.xhtml">arm_compute::Kernel</a></div><div class="ttdoc">Kernel class. </div><div class="ttdef"><b>Definition:</b> <a href="_c_l_kernel_library_8h_source.xhtml#l00098">CLKernelLibrary.h:98</a></div></div>
<div class="ttc" id="classarm__compute_1_1_c_l_kernel_library_xhtml_ab04a95a810e685a1207c7f3443668261"><div class="ttname"><a href="classarm__compute_1_1_c_l_kernel_library.xhtml#ab04a95a810e685a1207c7f3443668261">arm_compute::CLKernelLibrary::max_local_workgroup_size</a></div><div class="ttdeci">size_t max_local_workgroup_size(const cl::Kernel &amp;kernel) const </div><div class="ttdoc">Find the maximum number of local work items in a workgroup can be supported for the kernel...</div></div>
<div class="ttc" id="_open_c_l_8h_xhtml"><div class="ttname"><a href="_open_c_l_8h.xhtml">OpenCL.h</a></div></div>
<div class="ttc" id="classarm__compute_1_1_c_l_kernel_library_xhtml"><div class="ttname"><a href="classarm__compute_1_1_c_l_kernel_library.xhtml">arm_compute::CLKernelLibrary</a></div><div class="ttdoc">CLKernelLibrary class. </div><div class="ttdef"><b>Definition:</b> <a href="_c_l_kernel_library_8h_source.xhtml#l00140">CLKernelLibrary.h:140</a></div></div>
<div class="ttc" id="classarm__compute_1_1_program_xhtml_aa960ae62f188ce6593855ea9d90f3140"><div class="ttname"><a href="classarm__compute_1_1_program.xhtml#aa960ae62f188ce6593855ea9d90f3140">arm_compute::Program::operator=</a></div><div class="ttdeci">Program &amp; operator=(const Program &amp;)=default</div><div class="ttdoc">Default copy assignment operator. </div></div>
<div class="ttc" id="classarm__compute_1_1_c_l_kernel_library_xhtml_ad7395c158d8e31b9af211b9bc1f65a08"><div class="ttname"><a href="classarm__compute_1_1_c_l_kernel_library.xhtml#ad7395c158d8e31b9af211b9bc1f65a08">arm_compute::CLKernelLibrary::get_kernel_path</a></div><div class="ttdeci">std::string get_kernel_path()</div><div class="ttdoc">Gets the path that the kernels reside in. </div><div class="ttdef"><b>Definition:</b> <a href="_c_l_kernel_library_8h_source.xhtml#l00179">CLKernelLibrary.h:179</a></div></div>
<div class="ttc" id="classarm__compute_1_1_kernel_xhtml_a37627d5d5bba7f4a8690c71c2ab3cb07"><div class="ttname"><a href="classarm__compute_1_1_kernel.xhtml#a37627d5d5bba7f4a8690c71c2ab3cb07">arm_compute::Kernel::name</a></div><div class="ttdeci">std::string name() const </div><div class="ttdoc">Returns kernel name. </div><div class="ttdef"><b>Definition:</b> <a href="_c_l_kernel_library_8h_source.xhtml#l00121">CLKernelLibrary.h:121</a></div></div>
<div class="ttc" id="classarm__compute_1_1_c_l_kernel_library_xhtml_a6dc2398a934f02224ad3743185f27699"><div class="ttname"><a href="classarm__compute_1_1_c_l_kernel_library.xhtml#a6dc2398a934f02224ad3743185f27699">arm_compute::CLKernelLibrary::default_ndrange</a></div><div class="ttdeci">cl::NDRange default_ndrange() const </div><div class="ttdoc">Return the default NDRange for the device. </div></div>
<div class="ttc" id="classarm__compute_1_1_program_xhtml_ad321fe7c8b8db45f1e48b6f7d13346c5"><div class="ttname"><a href="classarm__compute_1_1_program.xhtml#ad321fe7c8b8db45f1e48b6f7d13346c5">arm_compute::Program::build</a></div><div class="ttdeci">static bool build(const cl::Program &amp;program, const std::string &amp;build_options=&quot;&quot;)</div></div>
<div class="ttc" id="classarm__compute_1_1_c_l_kernel_library_xhtml_a07b37240bd1f09e36cf119dced79f9c4"><div class="ttname"><a href="classarm__compute_1_1_c_l_kernel_library.xhtml#a07b37240bd1f09e36cf119dced79f9c4">arm_compute::CLKernelLibrary::create_kernel</a></div><div class="ttdeci">Kernel create_kernel(const std::string &amp;kernel_name, const StringSet &amp;build_options_set={}) const </div><div class="ttdoc">Creates a kernel from the kernel library. </div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_d4d363c0979c7ffda4833df3f93b5668.xhtml">arm_compute</a></li><li class="navelem"><a class="el" href="dir_62e76289bb143101bef0ade0babfd908.xhtml">core</a></li><li class="navelem"><a class="el" href="dir_05f0d9b6fc8ae7732f7cdd827386fe59.xhtml">CL</a></li><li class="navelem"><a class="el" href="_c_l_kernel_library_8h.xhtml">CLKernelLibrary.h</a></li>
    <li class="footer">Generated on Thu Oct 12 2017 14:26:32 for Compute Library by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
  </ul>
</div>
</body>
</html>
